package com.realtyManage.springboot.Dao;


import com.realtyManage.springboot.Model.Do.HouseDynamic;
import com.realtyManage.springboot.Model.Do.ProjectAssort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

/**
 * 楼盘动态
 *
 * @author 杭州素色网络科技有限公司
 * @since 2019-10-14
 */

@Repository
public interface ProjectAssortRepository extends JpaRepository<ProjectAssort, Integer>, JpaSpecificationExecutor<ProjectAssort> {

    @Transactional
    @Modifying
    @Query(value = "delete from project_assort where id in (?1) ",nativeQuery = true)
    int deleteProjectAssort(List ids);

    @Query(value = "select * from project_assort where type = ?1",nativeQuery = true)
    List<ProjectAssort> queryPt(Integer type);

}
